
ADDIN = MonoDevelop.ResourceEditor.addin.xml
ADDIN_BUILD = $(top_builddir)/build/AddIns/MonoDevelop.ResourceEditor
ASSEMBLY = $(ADDIN_BUILD)/MonoDevelop.ResourceEditor.dll

REFS =  \
	-r:System \
	-r:System.Drawing \
	-r:System.Windows.Forms \
	-r:System.Xml \
	$(GTK_SHARP_LIBS) \
	-r:$(top_builddir)/build/AddIns/MonoDevelop.Components.dll \
	-r:$(top_builddir)/build/bin/MonoDevelop.Core.dll \
	-r:$(top_builddir)/build/AddIns/MonoDevelop.Core.Gui.dll \
	-r:$(top_builddir)/build/AddIns/MonoDevelop.Ide.dll \
	-r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.dll \
	-r:$(top_builddir)/build/AddIns/MonoDevelop.Projects.Gui.dll

FILES = \
AssemblyInfo.cs \
MonoDevelop.ResourceEditor/ResourceEventArgs.cs \
MonoDevelop.ResourceEditor/ResourceItem.cs \
MonoDevelop.ResourceEditor/ResourceItemCollection.cs \
MonoDevelop.ResourceEditor/Services.cs \
MonoDevelop.ResourceEditor.Gui/IResourceView.cs \
MonoDevelop.ResourceEditor.Gui/BooleanView.cs \
MonoDevelop.ResourceEditor.Gui/ResourceEditorWidget.cs \
MonoDevelop.ResourceEditor.Gui/ResourceList.cs \
MonoDevelop.ResourceEditor.Gui/StringView.cs \
MonoDevelop.ResourceEditor.Gui/ResourceEditorDisplayBinding.cs \
MonoDevelop.ResourceEditor.Gui/ResourceEditorView.cs

RES = 

all: $(ASSEMBLY) $(ADDIN_BUILD)/$(ADDIN)

$(ADDIN_BUILD)/$(ADDIN): $(srcdir)/$(ADDIN)
	mkdir -p $(ADDIN_BUILD)
	cp $(srcdir)/$(ADDIN) $@

$(ADDIN_BUILD)/%: $(srcdir)/lib/%
	mkdir -p $(ADDIN_BUILD)
	cp $< $@

$(ASSEMBLY): $(build_sources) $(RES)
	mkdir -p $(ADDIN_BUILD)
	$(CSC) $(CSC_FLAGS) -debug -out:$@ -target:library \
	$(RES:%=/resource:%) $(build_sources) $(REFS)

assemblydir = $(MD_ADDIN_DIR)/MonoDevelop.ResourceEditor
assembly_DATA = $(ASSEMBLY) $(ASSEMBLY).mdb $(ADDIN)

CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb $(ADDIN_BUILD)/$(ADDIN)
EXTRA_DIST = $(FILES) $(ADDIN) $(RES)

include $(top_srcdir)/Makefile.include
